//
//  MyHeaderView.m
//  一点互助
//
//  Created by 张泊秋 on 16/8/19.
//  Copyright © 2016年 zhangboqiu. All rights reserved.
//

#import "MyHeaderView.h"

@implementation MyHeaderView

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    
    return self;
}

-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
    
}

+ (instancetype)loadMyHeaderView {
    MyHeaderView *view = [[[NSBundle mainBundle] loadNibNamed:@"MyHeaderView" owner:nil options:nil] firstObject];
    return view;
}

- (IBAction)ButtonTaped:(UIButton *)sender {
    
    NSInteger index = sender.tag - 300;
    
    if (self.delegate && [self.delegate respondsToSelector:@selector(myHeaderView:didTapedCategoryButtonAtIndex:)]) {
        [self.delegate myHeaderView:self didTapedCategoryButtonAtIndex:index];
    }
    
    
}


@end
